package com.meixiang.entity.shopping;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 运送方式
 *
 * @author LZRUI
 */
public class TransportEntity implements Parcelable {

    private String transportId; // id
    private String transportName; // 快递
    private String transportPrice; // 运费

    public TransportEntity() {
    }

    public TransportEntity(String transportId, String transportName, String transportPrice) {
        this.transportId = transportId;
        this.transportName = transportName;
        this.transportPrice = transportPrice;
    }

    public String getTransportId() {
        return transportId == null ? "" : transportId;
    }

    public void setTransportId(String transportId) {
        this.transportId = transportId;
    }

    public String getTransportName() {
        return transportName == null ? "" : transportName;
    }

    public void setTransportName(String transportName) {
        this.transportName = transportName;
    }

    public String getTransportPrice() {
        return transportPrice == null ? "0" : transportPrice;
    }

    public void setTransportPrice(String transportPrice) {
        this.transportPrice = transportPrice;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.transportId);
        dest.writeString(this.transportName);
        dest.writeString(this.transportPrice);
    }

    protected TransportEntity(Parcel in) {
        this.transportId = in.readString();
        this.transportName = in.readString();
        this.transportPrice = in.readString();
    }

    public static final Parcelable.Creator<TransportEntity> CREATOR = new Parcelable.Creator<TransportEntity>() {
        @Override
        public TransportEntity createFromParcel(Parcel source) {
            return new TransportEntity(source);
        }

        @Override
        public TransportEntity[] newArray(int size) {
            return new TransportEntity[size];
        }
    };
}
